﻿using Adapters.Adapters.Interfaces;
using Adapters.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Adapters.Adapters.Adapters
{
    public class ToDoMockAdapter : IToDoAdapter
    {
        public List<ToDo> GetAllTasks()
        {
            return new List<ToDo>() {
                new ToDo() { ToDoId = 1, Description = "Mock Description", DateCreated = DateTime.Now},
                new ToDo() { ToDoId = 2, Description = "Mock Description 2", DateCreated = DateTime.Now},
                new ToDo() { ToDoId = 3, Description = "Mock Description 3", DateCreated = DateTime.Now},
            };
        }

        public int AddTask(ToDo model)
        {
            try
            {
                List<ToDo> tasks = new List<ToDo>();
                tasks.Add(model);
                return 1;
            }
            catch (Exception ex)
            {
                return 0;
            }
        }
    }
}